/**
 * @description 生成key
 * @returns {number}
 */
module.exports = function () {
    const lengthKey = [7, 8, 9, 10, 11]
    const endKey = [1,2,3,4,5,6,7,8,9,0]
    const startKey = [1,2,3,4,5,6,7,8]
    const length = lengthKey[Math.floor(Math.random() * lengthKey.length)]
    const key = []
    for (let i = 0; i < length - 1; i++) {
        key.push(endKey[Math.floor(Math.random() * endKey.length)])
    }
    key.unshift(startKey[Math.floor(Math.random() * startKey.length)])
    return parseInt(key.join(''))
}